<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
	<head>
		<title>党建后台管理</title>
		<meta name="description" content=""/>
		<meta name="keywords" content=""/>
		<link href="./css/base.css" rel="stylesheet" />
		<link href="./css/index.css" rel="stylesheet" />
		<script type="text/javascript" src="./js/user/jquery-1.7.2.min.js"></script>
		<script src="./js/user/login.js"></script>
	</head>
	<body>
    <div id="warpper">
    	<div id="header" class="w" style="text-align:center">
    		<h1 style="margin-top: 30px;">党建后台管理</h1>
    	</div><!-- 网站头部 -->
    	<div id="nav">
    		<div class="w">
    		</div>
    	</div><!-- 网站主导航 -->
    	<div id="main">
	    	<div class="w">
		    	<div class="login">
		    		<form id = "formId" name = "myform" action="${pageContext.request.contextPath}/j_spring_security_check" method="post" accept-charset="utf-8" >
		    			<div class="login-item">
		    				<label>用户名</label>
		    				<p class="input-box">
		    					<input id="username" type="text" name="j_username" placeholder="输入您的用户名"/>
		    				</p>
		    			</div>
		    			<div class="login-item">
		    				<label>密码${sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message}</label>
		    				<p class="input-box">
		    					<input id="password" type="password" name = "j_password" placeholder="输入您的密码">
		    				</p>
		    			</div>
		    			<c:if test="${sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message == 'Bad credentials'}">
	                     	<div class="login-item">
	                     		<label>&nbsp;&nbsp;&nbsp;&nbsp;</label>
		                     	<p class="input-box">
		                     		<font color="red">用户名或密码错误，请重新登陆</font>
		                     	</p>
	                     	</div>
                         </c:if>
		    			<div class="login-item">
		    				<!-- <div class="login-remember">
		    					<div class="lr-l fl"><input type="checkbox" name="" id="">记住我的登录状态</div>
		    					<a href="./retrievePassword.jsp" class="fr">忘记密码？</a>
		    				</div> -->
		    			</div>
		    			
		    			<div class="login-btn">
		    				<button id="submit" type="submit">登录</button>
		    			</div>
		    		</form>
		    		<div class="loginLine"></div>
		    	</div>
		    	
	    	</div>
	    </div><!-- 网站主题 -->
	    <div id="footer" class="mt20">
	    </div>
    </div>
</body>
</html>